package team.zero.lemon.module.dictionary.dao;

import team.zero.lemon.common.persistence.ICrudDao;
import team.zero.lemon.common.persistence.annotation.MyBatisDao;
import team.zero.lemon.module.dictionary.entity.Dictionary;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by bolin on 2016/4/28.
 */
@MyBatisDao
public interface IDictionaryDao extends ICrudDao<Dictionary> {
    /**
     * 获取用户权限菜单
     *
     * @param dic
     * @return
     */
    List<Dictionary> findByParentId(Dictionary dic);

    Dictionary findByParentIdAndName(@Param("parentId") int parentId, @Param("name") String name);
    public int deleteAll();
}
